package com.lrs.java.j2se_self.lastJava;
import java.util.*;

public class TestInterruptedEX {
	public static void main(String[] args){
		Runner2 r2 = new Runner2();
		Thread t2 = new Thread(r2);
		t2.start();
		try{
			 Thread.sleep(10000);
		}catch(InterruptedException e){
			e.printStackTrace();
		}
		t2.interrupt();
	}

	
}

class Runner2 implements Runnable {
	public void run(){
		while(true){
			System.out.println("the thread " + new Date() + "time");
			try{
				Thread.sleep(1000);
				
			}catch(InterruptedException e){
				return;
			}
		}
	}
}